package org.example;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.csp.sentinel.slots.block.degrade.DegradeException;
import com.alibaba.csp.sentinel.slots.block.flow.FlowException;


public class OrderControllerBlock {



    public static String sentinelBlock(String value, BlockException exception){
        String message = null;
        if (exception instanceof FlowException){
            message = "流量控制！";
        }else if (exception instanceof DegradeException){
            message = "熔断控制";
        }

        return "failed  msg = " + message.toString();
    }
}
